.detail-page {
  background-color: white;
  min-height: 100vh;
  position: relative;
  width: 100%;
  overflow-x: hidden;
  /* 防止水平滚动 */
}

/* 顶部导航栏 */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: white;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #eee;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

.back-button {
  font-size: 20px;
  color: #333;
  cursor: pointer;
  padding: 8px;
  margin-right: 16px;
}

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: center;
  margin-right: 40px;
  /* 为返回按钮留出空间 */
}

/* 主要内容 */
.detail-content {
  padding: 60px 16px 24px 16px;
  width: 100vw;
  box-sizing: border-box;
  max-width: 100%;
  position: relative;
  /* 作为绝对定位参照 */
}

/* 主标题 */
.main-title {
  font-size: 20px;
  font-weight: 600;
  color: #1890ff;
  margin-bottom: 20px;
  line-height: 1.4;
  width: 100%;
  word-wrap: break-word;
}

/* 信息区块 */
.info-section {
  margin-bottom: 16px;
  width: 100%;
}

.section-title {
  font-size: 14px;
  color: #1890ff;
  margin-bottom: 6px;
  font-weight: 500;
  width: 100%;
}

.section-content {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  word-wrap: break-word;
  margin-bottom: 4px;
  width: 100%;
  overflow-wrap: break-word;
}

/* 图片区域 */
.image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
  flex-wrap: wrap;
}

.image-time {
  font-size: 12px;
  color: #666;
  word-break: break-all;
}

.image-container {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ddd;
  max-width: 100%;
}

.detail-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* 底部交互栏 */
.bottom-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* 靠右排列 */
  gap: 16px;
  margin-top: 8px;
  padding: 0;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  float: none;
}

.interaction-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 0;
  height: auto;
  border: none;
  background: transparent;
}

/* 移除分隔线与交互背景反馈 */
.interaction-item+.interaction-item {
  border-left: none;
}

.interaction-item:hover {
  background: transparent;
}

.interaction-item:active {
  background: transparent;
}

.star-icon {
  font-size: 16px;
  color: #ffb400;
}

.comment-icon {
  font-size: 16px;
  color: #91caff;
}

/* 加载和错误状态 */
.loading,
.error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-size: 16px;
  color: #666;
  width: 100%;
}

.error {
  color: #ff4d4f;
}

.adopt-box {
  margin-top: 12px;
  background: #f5f9ff;
  border-radius: 6px;
  padding: 14px 16px 14px 16px;
  position: relative;
}

.adopt-box::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  background: #1677ff;
  border-radius: 2px;
}

.adopt-title {
  color: #1677ff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.adopt-content {
  color: #1f1f1f;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.comments-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  /* 底部上弹 */
  justify-content: center;
  z-index: 1500;
}

.comments-panel {
  width: 100vw;
  max-height: 70vh;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}


.comments-body {
  flex: 1;
  overflow: auto;
  padding: 8px 12px;
}

.comments-loading,
.no-comments {
  text-align: center;
  color: #999;
  padding: 24px 0;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #f2f2f2;
}

.comment-main {
  flex: 1;
  background: #ffffff;
  padding: 10px;
  border-radius: 4px;
}

.comment-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.comment-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.comment-time {
  font-size: 12px;
  color: #999;
}

.comment-content {
  margin-top: 4px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  word-break: break-word;
}

.comment-bottom {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* 左时间右点赞 */
}

.comment-time { font-size: 12px; color: #999; }

.comment-actions { display: flex; gap: 16px; color: #666; font-size: 13px; }

.comment-like,
.comment-dislike {
  user-select: none;
}

.comments-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
}

.comments-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  outline: none;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.comments-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  border-radius: 22px;
  background: rgba(0,0,0,0.78);
  padding: 0 8px 0 14px;
}

.comments-input-input {
  flex: 1;
  height: 32px;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
}

.comments-send-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  border: none;
  background: #1677ff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.comments-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 响应式设计 */
@media (max-width: 768px) {
  .detail-content {
    padding: 50px 12px 20px 12px;
  }

  .main-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .section-title {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .section-content {
    font-size: 13px;
  }

  .info-section {
    margin-bottom: 12px;
  }

  .bottom-bar {
    gap: 12px;
  }

  .interaction-item {
    gap: 4px;
  }

  .comments-panel {
    max-height: 75vh;
  }

  .comments-close-btn {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .comments-input { height: 42px; border-radius: 21px; }
  .comments-input-input { height: 30px; }
  .comments-send-btn { height: 30px; }
}